// Create by guowusheng on 2025/03/24
#ifndef APP_DEFINE_H
#define APP_DEFINE_H

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdarg.h>

#include "py32f0xx_ll_rcc.h"
#include "py32f0xx_ll_bus.h"
#include "py32f0xx_ll_system.h"
#include "py32f0xx_ll_exti.h"
#include "py32f0xx_ll_cortex.h"
#include "py32f0xx_ll_utils.h"
#include "py32f0xx_ll_pwr.h"
#include "py32f0xx_ll_dma.h"
#include "py32f0xx_ll_gpio.h"
#include "py32f0xx_ll_usart.h"
#include "py32f0xx_ll_adc.h"
#include "py32f0xx_ll_iwdg.h"
#include "py32f0xx_ll_tim.h"
#include "py32f0xx_ll_rtc.h"
#include "py32f0xx_ll_crc.h"
#include "py32f0xx_ll_i2c.h"
#include "py32f0xx_ll_lptim.h"

#define APP_SUCCESS             (0)
#define APP_FAILURE             (-1)

#define ret_if_fail(x)          if (!(x)) { return; }
#define ret_if_true(x)          if (x) { return; }
#define ret_val_if_fail(x, y)   if (!(x)) { return y; }
#define ret_val_if_true(x, y)   if (x) { return y; }

#endif